//
//  ServerModel.m
//  LazyHome
//
//  Created by yh on 2018/5/14.
//  Copyright © 2018年 yh. All rights reserved.
//

#import "ServerModel.h"
#import <MJExtension/MJExtension.h>

@implementation ServerModel
MJCodingImplementation
- (instancetype)init
{
    self = [super init];
    if (self) {
        NSDate *currentDate = [NSDate date];
        //用于格式化NSDate对象
        NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
        //设置格式：zzz表示时区
        [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss zzz"];
        //NSDate转NSString
        NSString *currentDateString = [dateFormatter stringFromDate:currentDate];
        self.serverId = defult_serverId;
        self.serverName = defult_serverName;
        self.host = defult_host;
        self.port = defult_port;
        self.serverId = currentDateString;
    }
    return self;
}

@end
